<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.8.3/angular.js"></script>
<script src="https://www.paypal.com/sdk/js?client-id=sb&debug=true"></script>

<script>
  paypal.Buttons.driver("angular", window.angular);

  angular
    .module("app", ["paypal-buttons"])
    .controller("appController", function ($scope) {
      $scope.opts = {
        createOrder: function (data, actions) {
          return actions.order.create({
            purchase_units: [
              {
                amount: {
                  value: "0.01",
                },
              },
            ],
          });
        },

        onApprove: function (data, actions) {
          return actions.order.capture();
        },
      };
    });
</script>

<body ng-app="app" ng-controller="appController">
  <paypal-buttons props="opts"></paypal-buttons>
</body>
